package com.atguigu.book.dao.impl;

import com.atguigu.book.dao.OrderItemDAO;
import com.atguigu.book.pojo.OrderItem;
import com.atguigu.myssm.basedao.BaseDAO;

/**
 * @ClassName: OrderItemDAOImpl
 * @Description:
 * @Author: wty
 * @Date: 2022/12/13
 */

public class OrderItemDAOImpl extends BaseDAO<OrderItem> implements OrderItemDAO {
    @Override
    public void addOrderItem(OrderItem orderItem) {
        String sqlStr = "INSERT INTO bookdb.`t_order_item` VALUES(0,?,?,?)";
        executeUpdate(sqlStr, orderItem.getBook().getId(), orderItem.getBuyCount(), orderItem.getOrderBean().getId());
    }
}
